/*
 * @Author: 刘润泽
 * @Date: 2023-02-22 19:39:56
 * @LastEditors: 刘润泽
 * @LastEditTime: 2023-03-14 21:23:10
 * @Description: 
 */
package server.main.config.springsecurity.config;

import org.junit.Test;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @auther MingHsZzz
 * @Date 2022/9/19 11:27
 * @project main
 * @description
 */

@Component
public class CommonWebMvcConfigurer {

   public String[] getStatic() {
      // 创建一个初始的config文件
      List<String> staticlist = new ArrayList<>();
      staticlist.add("/js/**");
      staticlist.add("/css/**");
      staticlist.add("/fonts/**");
      staticlist.add("/img/**");
      staticlist.add("/icons/**");
      staticlist.add("/plugins/**");
      staticlist.add("/element-theme/**");
      staticlist.add("/pages/before/**");
      staticlist.add("/before/**");
      staticlist.add("/favicon.ico");
      staticlist.add("/test/**");
      staticlist.add("/pages/components/**");
      staticlist.add("/pages/error/**");
//      staticlist.add("/**");
      return staticlist.toArray(new String[0]);
   }

   public String[] getNoFilterUrl() {

      List<String> staticlist = new ArrayList<>();
      staticlist.add("/checkLogin");
      staticlist.add("/login");
      staticlist.add("/");
      staticlist.add("/test/**");
      staticlist.add("/before/**");

      return staticlist.toArray(new String[0]);
   }

   @Test
   public void test1() {
      for (String s : getStatic()) {
         System.out.println(s);
      }

   }

}
